Optimal. Leaf size=66 \[ -\sqrt{d^2-e^2 x^2}+2 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-d \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.111386, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.259, Rules used = {1809, 844, 217, 203, 266, 63, 208} \[ -\sqrt{d^2-e^2 x^2}+2 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-d \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1809
Rule 844
Rule 217
Rule 203
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{(d+e x)^2}{x \sqrt{d^2-e^2 x^2}} \, dx &=-\sqrt{d^2-e^2 x^2}-\frac{\int \frac{-d^2 e^2-2 d e^3 x}{x \sqrt{d^2-e^2 x^2}} \, dx}{e^2}\\ &=-\sqrt{d^2-e^2 x^2}+d^2 \int \frac{1}{x \sqrt{d^2-e^2 x^2}} \, dx+(2 d e) \int \frac{1}{\sqrt{d^2-e^2 x^2}} \, dx\\ &=-\sqrt{d^2-e^2 x^2}+\frac{1}{2} d^2 \operatorname{Subst}\left (\int \frac{1}{x \sqrt{d^2-e^2 x}} \, dx,x,x^2\right )+(2 d e) \operatorname{Subst}\left (\int \frac{1}{1+e^2 x^2} \, dx,x,\frac{x}{\sqrt{d^2-e^2 x^2}}\right )\\ &=-\sqrt{d^2-e^2 x^2}+2 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-\frac{d^2 \operatorname{Subst}\left (\int \frac{1}{\frac{d^2}{e^2}-\frac{x^2}{e^2}} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{e^2}\\ &=-\sqrt{d^2-e^2 x^2}+2 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-d \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )\\ \end{align*}
Mathematica [A] time = 0.0288008, size = 66, normalized size = 1. \[ -\sqrt{d^2-e^2 x^2}+2 d \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-d \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 91, normalized size = 1.4 \begin{align*} -\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}+2\,{\frac{de}{\sqrt{{e}^{2}}}\arctan \left ({\frac{\sqrt{{e}^{2}}x}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}} \right ) }-{{d}^{2}\ln \left ({\frac{1}{x} \left ( 2\,{d}^{2}+2\,\sqrt{{d}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}} \right ) } \right ){\frac{1}{\sqrt{{d}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.848, size = 149, normalized size = 2.26 \begin{align*} -4 \, d \arctan \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{e x}\right ) + d \log \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{x}\right ) - \sqrt{-e^{2} x^{2} + d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 5.50238, size = 187, normalized size = 2.83 \begin{align*} d^{2} \left (\begin{cases} - \frac{\operatorname{acosh}{\left (\frac{d}{e x} \right )}}{d} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\\frac{i \operatorname{asin}{\left (\frac{d}{e x} \right )}}{d} & \text{otherwise} \end{cases}\right ) + 2 d e \left (\begin{cases} \frac{\sqrt{\frac{d^{2}}{e^{2}}} \operatorname{asin}{\left (x \sqrt{\frac{e^{2}}{d^{2}}} \right )}}{\sqrt{d^{2}}} & \text{for}\: d^{2} > 0 \wedge e^{2} > 0 \\\frac{\sqrt{- \frac{d^{2}}{e^{2}}} \operatorname{asinh}{\left (x \sqrt{- \frac{e^{2}}{d^{2}}} \right )}}{\sqrt{d^{2}}} & \text{for}\: d^{2} > 0 \wedge e^{2} < 0 \\\frac{\sqrt{\frac{d^{2}}{e^{2}}} \operatorname{acosh}{\left (x \sqrt{\frac{e^{2}}{d^{2}}} \right )}}{\sqrt{- d^{2}}} & \text{for}\: d^{2} < 0 \wedge e^{2} < 0 \end{cases}\right ) + e^{2} \left (\begin{cases} \frac{x^{2}}{2 \sqrt{d^{2}}} & \text{for}\: e^{2} = 0 \\- \frac{\sqrt{d^{2} - e^{2} x^{2}}}{e^{2}} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17565, size = 88, normalized size = 1.33 \begin{align*} 2 \, d \arcsin \left (\frac{x e}{d}\right ) \mathrm{sgn}\left (d\right ) - d \log \left (\frac{{\left | -2 \, d e - 2 \, \sqrt{-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \,{\left | x \right |}}\right ) - \sqrt{-x^{2} e^{2} + d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]